package day04;

public class MethodDemo {
    public static void main(String[] args) {
        int x = 10;
        int y = 20;
        // 单独调用
        // sum(x, y);
        // 输出调用
        // System.out.println(sum(x, y));
        // 赋值调用
        int result = sum(x, y);
        System.out.println(result);

    }

    public static int sum (int a, int b) {
        int c = a + b;
        return c;
    }
}
